﻿using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using VM.Entity.EntityMap.User;
using VM.Entity.EntityMap.VipLevel;

namespace VM.Entity.EntityMap.Member
{
    public class sys_member
    {


        #region Model
        private int? _id;
        private int? _registertype;
        private string _name;
        private int? _sex;
        private string _pwd;
        private string _nickname;
        private string _avatar;
        private string _phone;
        private DateTime? _createdatetime;
        private int? _createuserid;
        private int? _usertype;
        private int? _isvip;
        private int? _viplevelId;
        private int? _iswalletpwd;
        private string? _walletpwd;
        private string? _shortdesc;
        private DateTime? _birthday;
        private int? _countryregion;
        private int? _provinceregion;
        private int? _cityregion;
        private int? _countyregion;
        /// <summary>
        /// 内码
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsOnlyIgnoreInsert = true)]
        public int? id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 注册类型  1 账号密码  2验证码 3本机号码一键登录 4微信openid一键登录
        /// </summary>
        public int? registerType
        {
            set { _registertype = value; }
            get { return _registertype; }
        }
        /// <summary>
        /// 姓名
        /// </summary>
        public string? name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 性别  1 男 2女
        /// </summary>
        public int? sex
        {
            set { _sex = value; }
            get { return _sex; }
        }
        /// <summary>
        /// 密码
        /// </summary>
        public string? pwd
        {
            set { _pwd = value; }
            get { return _pwd; }
        }
        /// <summary>
        /// 昵称
        /// </summary>
        public string? nickName
        {
            set { _nickname = value; }
            get { return _nickname; }
        }
        /// <summary>
        /// 头像
        /// </summary>
        public string? avatar
        {
            set { _avatar = value; }
            get { return _avatar; }
        }
        /// <summary>
        /// 电话
        /// </summary>
        public string? phone
        {
            set { _phone = value; }
            get { return _phone; }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? createDatetime
        {
            set { _createdatetime = value; }
            get { return _createdatetime; }
        }
        /// <summary>
        /// 创建人内码
        /// </summary>
        public int? createUserId
        {
            set { _createuserid = value; }
            get { return _createuserid; }
        }
        /// <summary>
        /// 使用类型
        /// </summary>
        public int? userType
        {
            set { _usertype = value; }
            get { return _usertype; }
        }
        /// <summary>
        /// 是否vip
        /// </summary>
        public int? isVip
        {
            set { _isvip = value; }
            get { return _isvip; }
        }
        /// <summary>
        /// vip类型
        /// </summary>
        public int? vipLevelId
        {
            set { _viplevelId = value; }
            get { return _viplevelId; }
        }
        [Navigate(NavigateType.OneToOne, nameof(vipLevelId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public vip_level? vipLevel { get; set; }

        /// <summary>
        /// 创建人信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(createUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user? createUser { get; set; }

       

        //[JsonIgnore]
        //[SugarColumn(IsIgnore    = true)]
        //public string? vipLevelName { get; set; }

        /// <summary>
        /// 是否钱包密码
        /// </summary>
        public int? isWalletPwd
        {
            set { _iswalletpwd = value; }
            get { return _iswalletpwd; }
        }
        /// <summary>
        /// 钱包密码
        /// </summary>
        public string? walletPwd
        {
            set { _walletpwd = value; }
            get { return _walletpwd; }
        }
        /// <summary>
        /// 简介
        /// </summary>
        public string? shortDesc
        {
            set { _shortdesc = value; }
            get { return _shortdesc; }
        }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? birthDay
        {
            set { _birthday = value; }
            get { return _birthday; }
        }
        /// <summary>
        /// 国家内码
        /// </summary>
        public int? countryRegion
        {
            set { _countryregion = value; }
            get { return _countryregion; }
        }
        /// <summary>
        /// 省份内码
        /// </summary>
        public int? provinceRegion
        {
            set { _provinceregion = value; }
            get { return _provinceregion; }
        }
        /// <summary>
        /// 市内码
        /// </summary>
        public int? cityRegion
        {
            set { _cityregion = value; }
            get { return _cityregion; }
        }
        /// <summary>
        /// 县区内码
        /// </summary>
        public int? countyRegion
        {
            set { _countyregion = value; }
            get { return _countyregion; }
        }

        /// <summary>
        /// 微信公钥信息
        /// </summary>
        public string? wxOpenId { get; set; }



        public  string? qrCodeImgUrl { get; set; }

        /// <summary>
        /// 二维码关键信息
        /// </summary>
        public string? qrCodeInfo { get; set; }
        #endregion Model


    }
}
